package com.dubito.pattern.创建型模式.生成器模式OR建造者模式.计算机生产;

/**
 * @author liliang
 * @date 2020/8/26.
 */
public class ComputerDirector {

    private ComputerBuilder builder;

    public T410 constructT410() {
        builder = new T410Builder();
        builder.buildCup();
        builder.buildGraphicCard();
        builder.buildRam();
        builder.buildHardDisk();
        builder.buildMonitor();
        builder.buildOs();
        return (T410) builder.getResult();
    }

    public X201 constructX201() {
        builder = new X201Builder();
        builder.buildCup();
        builder.buildRam();
        builder.buildHardDisk();
        builder.buildMonitor();
        builder.buildOs();
        return (X201) builder.getResult();
    }
}
